package com.ruoyi.common.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

public class MemberConstants {

    @Getter
    @AllArgsConstructor
    public enum MemberVipTypeConditionEnum{
        RECHARGE(0,"累计充值金额"),
        PETROL(1,"累计加油金额（微信支付）"),
        RECHARGE_PETROL(2,"累计消费金额（累计充值+累计加油）"),
        OTHER(-1,"其他"),
        ;

        private int value;
        private String name;

        public static MemberVipTypeConditionEnum match(int value) {
            for (MemberVipTypeConditionEnum one : MemberVipTypeConditionEnum.values()) {
                if (one.getValue() == value) {
                    return one;
                }
            }
            return MemberVipTypeConditionEnum.OTHER;
        }

    }
}
